package com.spsoft.workflow.common.enums.bus;

import com.spsoft.workflow.common.WorkFlowConstants;
import com.spsoft.workflow.common.enums.BusFlowTypeEnums;
import lombok.AllArgsConstructor;

import lombok.Getter;

/**
 * 手工开票流程节点枚举
 *
 * @author cdl
 * @date 2023/12/15
 */
@Getter
@AllArgsConstructor
public enum ManualNodeEnums {

    ROOT(WorkFlowConstants.ROOT_EVENT_ID, "提交"),
    FLOW_SGKP_SP(BusFlowTypeEnums.FLOW_SGKP+"_SP", "审批"),
    FLOW_SGKP_KP(BusFlowTypeEnums.FLOW_SGKP+"_KP", "开票");

    private final String code;
    private final String name;

    public static ManualNodeEnums valueOfCode(String code) {
        for (ManualNodeEnums value : values()) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }
}
